/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eu.easyedu.dictionary.editor;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import org.openide.util.ImageUtilities;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;

/**
 * Action which shows DefaultDictionaryWindow component.
 */
public class DefaultDictionaryWindowAction extends AbstractAction {
    
    private final static long serialVersionUID = 1L;

    public DefaultDictionaryWindowAction() {
        super(NbBundle.getMessage(DefaultDictionaryWindowAction.class, "CTL_DefaultDictionaryWindowAction"));
        putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(DefaultDictionaryWindowTopComponent.ICON_PATH, true)));
    }

    public void actionPerformed(ActionEvent evt) {
        TopComponent win = DefaultDictionaryWindowTopComponent.findInstance();
        win.open();
        win.requestActive();
    }
}
